{-# OPTIONS_GHC -XDeriveDataTypeable #-}
module WS.XI.ChangeListServiceVi where
import Data.Typeable
import Data.Time.LocalTime

import WS.Runtime.Xmlable
import WS.Runtime.Main

import qualified WS.XI.Com.Sap.Aii.Ibdir.Server.Api.Types as S0
import qualified WS.XI.Com.Sap.Aii.Ib.Server.Api.Types as S1

nss :: [(String, String)]
nss = [("tns","urn:ChangeListServiceVi"),("s0","urn:com.sap.aii.ibdir.server.api.types"),("s1","urn:com.sap.aii.ib.server.api.types")]
ws :: String
ws = "ChangeListService"
-- operations

activate :: WsParams -> Activate__ -> IO ActivateResponse__
activate = runService ws nss "tns:activate"
checkContent :: WsParams -> CheckContent__ -> IO CheckContentResponse__
checkContent = runService ws nss "tns:checkContent"
create :: WsParams -> Create__ -> IO CreateResponse__
create = runService ws nss "tns:create"
getCacheState :: WsParams -> GetCacheState__ -> IO GetCacheStateResponse__
getCacheState = runService ws nss "tns:getCacheState"
getObjectIdentifiers :: WsParams -> GetObjectIdentifiers__ -> IO GetObjectIdentifiersResponse__
getObjectIdentifiers = runService ws nss "tns:getObjectIdentifiers"
getState :: WsParams -> GetState__ -> IO GetStateResponse__
getState = runService ws nss "tns:getState"
revert :: WsParams -> Revert__ -> IO RevertResponse__
revert = runService ws nss "tns:revert"


-- types definition

data Activate__ = Activate__ {
    changeListActivateRequestActivate :: Maybe String
} deriving (Typeable, Eq) 

data ActivateResponse__ = ActivateResponse__ {
    responseActivateResponse :: Maybe S0.LogMessageCollection__
} deriving (Typeable, Eq) 

data CheckContent__ = CheckContent__ {
    changeListCheckContentRequestCheckContent :: Maybe String
} deriving (Typeable, Eq) 

data CheckContentResponse__ = CheckContentResponse__ {
    responseCheckContentResponse :: Maybe S0.LogMessageCollection__
} deriving (Typeable, Eq) 

data Create__ = Create__ {
    changeListCreateRequestCreate :: Maybe S1.ChangeListIDRestricted__
} deriving (Typeable, Eq) 

data CreateResponse__ = CreateResponse__ {
    responseCreateResponse :: Maybe S0.ChangeListCreateOut__
} deriving (Typeable, Eq) 

data GetCacheState__ = GetCacheState__ {
    changeListGetCacheStateRequestGetCacheState :: Maybe String
} deriving (Typeable, Eq) 

data GetCacheStateResponse__ = GetCacheStateResponse__ {
    responseGetCacheStateResponse :: Maybe S0.ChangeListGetCacheStateOut__
} deriving (Typeable, Eq) 

data GetObjectIdentifiers__ = GetObjectIdentifiers__ {
    changeListGetObjectIdentifiersRequestGetObjectIdentifiers :: Maybe String
} deriving (Typeable, Eq) 

data GetObjectIdentifiersResponse__ = GetObjectIdentifiersResponse__ {
    responseGetObjectIdentifiersResponse :: Maybe S0.ChangeListGetObjectIdentifiersOut__
} deriving (Typeable, Eq) 

data GetState__ = GetState__ {
    changeListGetStateRequestGetState :: Maybe String
} deriving (Typeable, Eq) 

data GetStateResponse__ = GetStateResponse__ {
    responseGetStateResponse :: Maybe S0.ChangeListGetStateOut__
} deriving (Typeable, Eq) 

data Revert__ = Revert__ {
    changeListRevertRequestRevert :: Maybe String
} deriving (Typeable, Eq) 

data RevertResponse__ = RevertResponse__ {
    responseRevertResponse :: Maybe S0.LogMessageCollection__
} deriving (Typeable, Eq) 



-- instances


instance Xmlable Activate__ where
	toContent x = [makeToContent ["tns:ChangeListActivateRequest"] [toContent.changeListActivateRequestActivate] x]
	fromContent cs = Activate__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListActivateRequest"] cs

instance Xmlable ActivateResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseActivateResponse] x]
	fromContent cs = ActivateResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable CheckContent__ where
	toContent x = [makeToContent ["tns:ChangeListCheckContentRequest"] [toContent.changeListCheckContentRequestCheckContent] x]
	fromContent cs = CheckContent__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListCheckContentRequest"] cs

instance Xmlable CheckContentResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseCheckContentResponse] x]
	fromContent cs = CheckContentResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Create__ where
	toContent x = [makeToContent ["tns:ChangeListCreateRequest"] [toContent.changeListCreateRequestCreate] x]
	fromContent cs = Create__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListCreateRequest"] cs

instance Xmlable CreateResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseCreateResponse] x]
	fromContent cs = CreateResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable GetCacheState__ where
	toContent x = [makeToContent ["tns:ChangeListGetCacheStateRequest"] [toContent.changeListGetCacheStateRequestGetCacheState] x]
	fromContent cs = GetCacheState__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListGetCacheStateRequest"] cs

instance Xmlable GetCacheStateResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseGetCacheStateResponse] x]
	fromContent cs = GetCacheStateResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable GetObjectIdentifiers__ where
	toContent x = [makeToContent ["tns:ChangeListGetObjectIdentifiersRequest"] [toContent.changeListGetObjectIdentifiersRequestGetObjectIdentifiers] x]
	fromContent cs = GetObjectIdentifiers__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListGetObjectIdentifiersRequest"] cs

instance Xmlable GetObjectIdentifiersResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseGetObjectIdentifiersResponse] x]
	fromContent cs = GetObjectIdentifiersResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable GetState__ where
	toContent x = [makeToContent ["tns:ChangeListGetStateRequest"] [toContent.changeListGetStateRequestGetState] x]
	fromContent cs = GetState__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListGetStateRequest"] cs

instance Xmlable GetStateResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseGetStateResponse] x]
	fromContent cs = GetStateResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

instance Xmlable Revert__ where
	toContent x = [makeToContent ["tns:ChangeListRevertRequest"] [toContent.changeListRevertRequestRevert] x]
	fromContent cs = Revert__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:ChangeListRevertRequest"] cs

instance Xmlable RevertResponse__ where
	toContent x = [makeToContent ["tns:Response"] [toContent.responseRevertResponse] x]
	fromContent cs = RevertResponse__ (fromContent c1)
		where [c1] = forFromContent nss ["tns:Response"] cs

